package com.ruoyi.business.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import jakarta.validation.constraints.NotNull;
import lombok.*;

import java.util.Date;

/**
 * 人员档案类型业务对象 file_person_file_type
 *
 * @author xxyd
 * @date 2024-11-27
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PersonFileBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 人员ID
     */
    @NotNull(message = "人员ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long personId;

    /**
     * 档案顶级类型
     */
    @NotNull(message = "档案顶级类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long fileTopType;

    /**
     * 档案类型
     */
    @NotNull(message = "档案类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long fileType;

    private String name;

    /**
     * 封面图
     */
    private Long coverImage;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date fileFromTime;

    private String status;
}
